package com.group.three.service.impl.myorderimpl;

import com.group.three.entity.myOrder.MemberAddress;
import com.group.three.mapper.MemberAddressBuyerMapper;
import com.group.three.service.myorderservice.MemberAddressBuyerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MemberAddressBuyerServiceImpl implements MemberAddressBuyerService {
    @Autowired
    private MemberAddressBuyerMapper memberAddressBuyerMapper;

    @Override
    public List<MemberAddress> getAddressByMember(String memberId) {
        return memberAddressBuyerMapper.getAddressByMember(memberId);
    }

    @Override
    public MemberAddress getAddressItem(Long id) {
        return memberAddressBuyerMapper.getAddressItem(id);
    }

    @Override
    public int updateMemberAddress(MemberAddress shippingAddress) {
        return memberAddressBuyerMapper.updateMemberAddress(shippingAddress);
    }

    @Override
    public int addMemberAddress(MemberAddress shippingAddress) {
        return memberAddressBuyerMapper.addMemberAddress(shippingAddress);
    }

    @Override
    public int removeMemberAddress(String id) {
        return memberAddressBuyerMapper.removeMemberAddress(id);
    }
}
